HGetVol
You can use theHGetVol
function to determine the current default volume and
default directory.
FUNCTION HGetVol (volName: StringPtr; VAR vRefNum: Integer; VAR dirID: LongInt): OSErr;
volName
- A pointer to the name of the default volume.
vRefNum
- A volume reference number or a working directory reference number.
dirID
- The directory ID of the default directory.
DESCRIPTION
TheHGetVol
function returns the name and reference number of the default volume, as well as the directory ID of the default directory. A pointer to the name of the default volume is returned in thevolName
parameter, unless you setvolName
toNIL
before callingHGetVol
.The
HGetVol
function returns a working directory reference number in thevRefNum
parameter if the previous call toHSetVol
(orPBHSetVol
) passed in a working directory reference number. If, however, you have previously calledHSetVol
(orPBHSetVol
) specifying the target volume with a volume reference number, thenHGetVol
returns a volume reference number in thevRefNum
parameter.RESULT CODES
noErr 0 No error nsvErr -35 No default volume